import java.util.ArrayList;

public class Ship {
	private int size;
	private int flag;
	private boolean hor;
	private boolean isAlive;
	private ArrayList<Coord> pos;

	public Ship(int size, int hor, int ver, boolean orient) {
		this.setSize(size);
		setPos(new ArrayList<Coord>());
		for (int i = 0; i < this.size; i++) {
			if (orient) {
				getPos().add(new Coord(hor + i, ver));
			} else {
				getPos().add(new Coord(hor, ver + i));
			}

		}
		setHor(orient);
		setFlag(0);
		setAlive(true);

	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public boolean getHor() {
		return hor;
	}

	public void setHor(boolean hor) {
		this.hor = hor;
	}

	public boolean getAlive() {
		return isAlive;
	}

	public void setAlive(boolean isAlive) {
		this.isAlive = isAlive;
	}

	public ArrayList<Coord> getPos() {
		return pos;
	}

	public void setPos(ArrayList<Coord> pos) {
		this.pos = pos;
	}

	public int getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

}
